package com.gzhryc.dictionary.dao.enums;

public class CountryAreaEnum {

	public enum Type {
		
		Province(1,"省"),City(2,"地市"),CityArea(3,"城区");
		
		private Integer index;
		private String note;
		
		Type(Integer index,String note){
			this.index = index;
			this.note = note;
		}

		public Integer index() {
			return index;
		}

		public String note() {
			return note;
		}
		
		public static String note(Integer index){
			Type[] temp = Type.values();
			for(int i=0;i<temp.length;i++){
				Type item = temp[i];
				if(item.index.equals(index)){
					return item.note;
				}
			}
			return null;
		}
	}
	
	public enum Status {
		
		Usable(1,"可用"),Unusable(2,"不可用");
		
		private Integer index;
		private String note;
		
		Status(Integer index,String note){
			this.index = index;
			this.note = note;
		}

		public Integer index() {
			return index;
		}

		public String note() {
			return note;
		}
		
		public static String note(Integer index){
			Status[] temp = Status.values();
			for(int i=0;i<temp.length;i++){
				Status item = temp[i];
				if(item.index.equals(index)){
					return item.note;
				}
			}
			return null;
		}
	}
}
